cmake_minimum_required( VERSION 2.8 )
# 设置编译模式
set( CMAKE_BUILD_TYPE "Debug" )
# 设置PROJECT_NAME变量
set(PROJECT_NAME main)
# 声明一个 cmake 工程
project (${PROJECT_NAME})
set( SHARED_LIB_SOURCES   src/hello_world.c)
set( DIR_SRCS   src/main.c)
#aux_source_directory(src DIR_SRCS)
add_executable (${PROJECT_NAME} ${DIR_SRCS})
add_library( hello_world SHARED 
    ${SHARED_LIB_SOURCES}
)
TARGET_LINK_LIBRARIES(main hello_world)
include_directories("include/")
